/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package algebra;

import fvm.FVElement;
import java.util.ArrayList;

/**
 *
 * @author bittens
 */
public class ElementVector {
    
      
    private ArrayList<FVElement> vectorset;

    public ElementVector( ArrayList<ArrayList<FVElement>> fvelem) { 


        vectorset = new ArrayList<FVElement>();
        
        for (int i = 1; i < fvelem.size()-1; i++) {
            for (int j = 1; j < fvelem.get(0).size()-1; j++) {
                
                vectorset.add(fvelem.get(fvelem.size()-1-i).get(j));
                
            }
            

        }
        
    

    }
    
    public int getElementNumber(FVElement e){return vectorset.indexOf(e);}
    
    public int size(){return vectorset.size();}
    public FVElement get(int i){return vectorset.get(i);}
    
    public String toString(){
    
        String s = "";
        
        for (int i = 0; i < vectorset.size(); i++) {
            
            s += "h_"+vectorset.get(i).geti()+""+vectorset.get(i).getj()+"\n";
            
        }
        return s;
    }

}